﻿<UserControl
    x:Class="DemoApp.View.ContactView"
    x:ClassModifier="internal"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:DemoApp.View">
    <StackPanel
        Orientation="Vertical">
        <StackPanel.CommandBindings>
            <CommandBinding
                Command="{x:Static m:ContactView.ClearNamesCommand}" />
            <CommandBinding
                Command="{x:Static m:ContactView.NavigateUriCommand}" />
        </StackPanel.CommandBindings>
        <Label
            HorizontalAlignment="Right"
            FontStyle="Italic"
            FontWeight="Bold">
            <Label.Content>
                <Hyperlink
                    Command="{x:Static m:ContactView.NavigateUriCommand}"
                    CommandParameter="http://nikosbaxevanis.com"
                    NavigateUri="nikosbaxevanis.com">nikosbaxevanis.com</Hyperlink>
            </Label.Content>
        </Label>
        <Label
            Content="First Name" />
        <TextBox
            Text="{Binding Path=FirstName, UpdateSourceTrigger=PropertyChanged}"
            FontWeight="Bold"
            FontStyle="Italic" />
        <Label
            Content="Last Name" />
        <TextBox
            Text="{Binding Path=LastName, UpdateSourceTrigger=PropertyChanged}"
            FontWeight="Bold"
            FontStyle="Italic" />
        <Label
            Content="Full Name" />
        <TextBox
            IsReadOnly="True"
            Text="{Binding Path=FullName, UpdateSourceTrigger=PropertyChanged}"
            FontWeight="Bold"
            FontStyle="Italic" />
        <Label
            Content="Full Name (Reversed)" />
        <TextBox
            IsReadOnly="True"
            Text="{Binding Path=ReversedFullName, UpdateSourceTrigger=PropertyChanged}"
            FontWeight="Bold"
            FontStyle="Italic" />
        <Button
            Content="Clear Names"
            Command="{x:Static m:ContactView.ClearNamesCommand}"
            HorizontalAlignment="Right"
            Margin="0, 5, 0, 0"
            Width="148" />
    </StackPanel>
</UserControl>